package com.wcity.manage.service.community.image.impl;

import com.wcity.manage.dao.mapper.community.image.ImageMapper;
import com.wcity.manage.dao.model.community.image.ImageUrl;
import com.wcity.manage.service.community.image.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 图片服务
 * Created by hgg on 2016/12/16.
 */
@Service
public class ImageServiceImpl implements ImageService{

    @Autowired
    private ImageMapper imageMapper;

    /**
     * 新增图片
     * @param imageUrl
     * @return
     */
    @Override
    public Integer saveAddImage( ImageUrl imageUrl ) {

        return imageMapper.saveAddImage( imageUrl );
    }

    /**
     * 删除图片
     * @param deleteMap
     * @return
     */
    @Override
    public Integer deleteImage( Map<String,Object> deleteMap ) {

        return imageMapper.deleteImage( deleteMap );
    }

    /**
     * 获取图片列表
     * @param queryMap
     * @return
     */
    @Override
    public List<ImageUrl> images( Map<String,Object> queryMap ){

        return imageMapper.images( queryMap );
    }
}
